import QtQuick 2.15
import QtQuick.Controls 2.15
import QtQuick.Templates 2.15 as T

T.Button {
    id: controlBtn
    property bool havColor: false
    property bool havOpacity: true


    background: Rectangle {
        id: btnBG
        opacity: havOpacity ? (controlBtnMouseArea.containsPress ? 0.2 : (controlBtnMouseArea.containsMouse ? 0.3 : 0.0)) : (controlBtnMouseArea.containsPress ? 0.8 : (controlBtnMouseArea.containsMouse ? 1.0 : 0.0))
        color: havColor ? "#E6005A" : "#FFFFFF"
        radius: 1
        implicitWidth: 20
        implicitHeight: 20
    }

    MouseArea {
        id: controlBtnMouseArea
        anchors.fill: parent
        hoverEnabled: true
    }
}
